<div class="row personal-info-profile">

  <div class="col-sm-6">

    <form class="form-horizontal" role="form">
      <div class="form-group">
        <label class="control-label text-left col-sm-4" for="username">用户名</label>
        <div class="controls col-sm-8">
          <input id="username" name="username" class="form-control" ng-model="personalInfo.username" readonly/>
        </div>
      </div>

      <div class="form-group">
        <label class="control-label text-left col-sm-4" for="email">电邮地址</label>
        <div class="controls col-sm-8">
          <input id="email" name="email" class="form-control" ng-model="personalInfo.email" readonly/>
        </div>
      </div>

      <div class="form-group">
        <label class="control-label text-left col-sm-4" for="identify_number">学号/工作号</label>
        <div class="controls col-sm-8">
          <input id="identify_number" name="identify_number" class="form-control" ng-model="personalInfo.identify_number" type="text" placeholder="输入您的学号或工作号"/>
        </div>
      </div>

      <div class="form-group">
        <label class="control-label text-left col-sm-4" for="real_name">真实姓名</label>
        <div class="controls col-sm-8">
          <input id="real_name" name="real_name" class="form-control" ng-model="personalInfo.real_name" type="text" placeholder="输入您的真实姓名"/>
        </div>
      </div>

      <div class="form-group">
        <label class="control-label text-left col-sm-4">所在单位</label>
        <div class="'controls col-sm-8">
          <input type="text" ng-model="unit_name" class="form-control" readonly ng-show="unit_name" />
          <select class="form-control"
                  ng-model="personalInfo.unit_id"
                  ng-options="unit.id as unit.name for unit in unitList"
                  ng-hide="unit_name">
            <option value="">选择所在的单位</option>
          </select>
        </div>
      </div>

      <div class="form-group">
        <label class="control-label text-left col-sm-4" for="description">个人简介</label>
        <div class="'controls col-sm-8">
          <textarea id="description" name="description" class="form-control" ng-model="personalInfo.description" rows="5" placeholder="输入您的个人的简介"></textarea>
        </div>
      </div>

    </form>

  </div>

  <div class="col-sm-offset-1 col-sm-5">

    <div class="row">
      <div class="col-sm-8">
        <img ng-src="image/head_image/{{ personalInfo.head_image }}" style="width: 100%"/>
      </div>
    </div>

    <div class="row" style="margin-top: 1em">
      <div class="col-sm-offset-1 col-sm-6">
        <button ng-file-select ng-model="files" multiple="true" class="btn btn-success btn-block">点此上传新头像文件</button>
      </div>
    </div>

  </div>

</div>

<div class="row">
  <div class="col-sm-offset-2 col-sm-6">
    <div class="row">
      <div class="col-sm-6">
        <button class="btn btn-primary btn-block" ng-click="submitPersonalInfo()">确认</button>
      </div>
      <div class="col-sm-6">
        <button class="btn btn-danger btn-block" ng-click="cancel()">取消</button>
      </div>
    </div>
  </div>
</div>